package a03Leidemo3;

import java.util.ArrayList;
import java.util.Collections;

public class Test3 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        Collections.addAll(list, "abc", "acc", "bac", "ac");

        //静态方法中没有this
        list.stream()
                .filter(new Test3()::stringJudge)
                .forEach(s -> System.out.println(s));
    }

    public boolean stringJudge(String s) {
        return s.startsWith("a") && s.length() == 3;
    }
}
